<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="jt.classic.system.object.IObject"%>
<%@ page import="jt.classic.system.workflow.WObject"%>
<%@ page import="org.limp.mine.annex.AnnexInfo"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Map"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();
	IUser user = jt.classic.system.ISystem.getSessionUser(request);
	IObject obj = (IObject) request.getAttribute("object");
	WObject wobject = (WObject) request.getAttribute("wobject");
	String groupId = user.igroup().id();
	String groupName = user.igroup().iname();
	String type = StringTool.checkString(request.getParameter("type"));
	List list1 = (List)obj.icontent(wobject.itable("APP_XFHANDLER"));
    String label = "(街乡)";
	if(type.equals("1")){
		label = "(区)";
	}
	String g_groupName = "";
	if (list1 != null && !list1.isEmpty()) {
		for (int i = 0; i < list1.size(); i++) {
			Map info = (Map)list1.get(i);
			if(i ==0){
				g_groupName += info.get("H_GROUPNAME");
				
			}else{
				if((","+g_groupName+",").indexOf(","+info.get("H_GROUPNAME")+",")>-1){}
				else{
				   g_groupName += ","+info.get("H_GROUPNAME");
				}
			}
			
		
		}
	}
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>群体访接访处理意见</TITLE>
<link rel="stylesheet" type="text/css" href="<%=context%>/resources/ext3/ux/fileuploadfield/css/fileuploadfield.css"/>

<style type=text/css>
        .upload-icon {
            background: url('<%=context%>/resources/ext3/resources/images/image_add.png') no-repeat 0 0 !important;
        }
        #fi-button-msg {
            border: 2px solid #ccc;
            padding: 5px 10px;
            background: #eee;
            margin: 5px;
            float: left;
        }
    </style>

<jsp:include page="../../system/object/initial4edit.jsp"></jsp:include>
<script type="text/javascript" src="<%=context%>/resources/ext3/ux/fileuploadfield/FileUploadField.js"></script>
<link rel="stylesheet" type="text/css"
	href="<%=context%>/app/lf/css/xfstyle.css" />
	<script src="<%=context %>/app/lf/js/xfinit.js"></script>
<script src="<%=context %>/app/lf/js/qtfhdl.js"></script>

<script>

	var levelOneIds ;
	var levelOneNames ;
	var levelTwoIds  ;
	var levelTwoNames  ;
	var levelThreeIds  ;
	var levelThreeNames  ;
	var levelFourIds  ;
	var levelFourNames   ;
<%
         if(type.equals("1")){
     %>
     var url = context + '/system/objquery/commonlist.jsp?queryKey=qtlfhandlelist';
     <%
         }else{
     %>
     var url = context + '/system/objquery/commonlist.jsp?queryKey=qtlfhandlelist';
     <%
         }
     %>
     

     function init(){
         initLfdjStyle();
         editObject();
     }
     
   
     
     
</script>
</HEAD>
<BODY style="background-color:#fff;" onload="javascript:init();">
<form id="form1" name="form1" method="post"
	enctype="multipart/form-data" action=""><div style="display:none" ><input type="hidden"
	name="qtfid" value=""> <input type="hidden" name="DJRID"
	value="<%=user.id() %>"> <input type="hidden" name="LFTYPE"
	value="<%=type %>"> </div>
<table width="800" align="center">
<tr><td align="left">
<div id="subBtn"></div><input type="button" name="btn2"  id="btn2" value=" 填写处理意见 " title="填写处理意见" class="button0" onclick="javascript:handleOK2('<%=obj.id() %>');">
</td></tr>
<tr><td></td></tr>
</table>
<table width="800" class="tab4edit" border="1" cellspacing="0"
	cellpadding="0" align="center">

	<tr>
		<td colspan="4" class="tdtlt">
		<div align="center"><!-- <%=label %> -->群体访接访登记</div>
		</td>
	</tr>
	<tr align="left" bgcolor="#FFFF99">
		<td colspan="4" valign="middle"><font color=red>带</font><font
			color="#003399">“</font><font color=red>*</font><font color="#003399">”</font><font
			color=red>的项目为必填项</font></td>
	</tr>

	<TR bgColor=#ffffff>
		<td align="right" valign="middle" class="td0" width="15%">内容分类 </td>
		<td align="left" colspan="3"><input type="text" name="NRNAME" id="NRNAME"
			value=""> </td>
	</TR>
	<tr>
		<td height="40" align="right" valign="middle" class="td0">来访性质</td>
		<td align="left" colspan="3"><input type="checkbox"
			name="LFXZID_0" value="1" />正常&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input
			type="checkbox" name="LFXZID_1" value="1" />围堵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_2" value="1" />滞留&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_3" value="1" />闹事&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_4" value="1" />静坐&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_5" value="1" />重要访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
		<input type="checkbox" name="LFXZID_6" value="1" />强制&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_7" value="1" />越级&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_8" value="1" />不稳定因素&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_9" value="1" />包案后上访&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="checkbox" name="LFXZID_10" value="1" />未预报（20人以上）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td align="left" width="35%"><input type="text" name="RS" maxlength="5"
			size="4" value="" onkeyup="value=value.replace(/[^\d]/g,'');setJFT(this.value)"
			colneed="1" label="人数" /> 人 <input type="hidden" name="JTF" id="JTF"/></td>
		<td class="td0">所 属 社 区 </td>
		<td align="left" width="35%"><input type="text" name="SSDNAME" value="">
		</td>
	</tr>
	<tr align="right" valign="middle" style="display:none">
		<td class="td0">登 记 人 <FONT COLOR="#FF3366">*</FONT></td>
		<td align="left"><%=user.iname()%> <input type="hidden"
			name="DJRID" value="<%=user.id() %>"> <input type="hidden"
			name="DJRNAME" value="<%=user.iname() %>"></td>
		<td class="td0"></td>
		<td align="left" colspan="3"><input name="XFTIME" size="15"
			value="<%=DateTrimmer.getYMD() %>" type="hidden"/></td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容 <FONT
			COLOR="#FF3366">*</FONT></td>
		<td colspan="3" align="left"><textarea name="NR" cols="80"
			rows="5" colneed="1" label="内容"></textarea></td>
	</tr>
	
	<tr align="right" valign="middle" id="lingdao1">
		<td align="right" valign="middle" class="td0">接访部门</td>
		<td align="left"> <input
			type="text" readonly="true" name="JFDWNAME" value="<%=groupName %>"></td>
		<td class="td0">处理等级</td>
		<td align="left"> <input  name="HANDLELEVEL" id="HANDLELEVEL"> 级
		</td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">协调部门 </td>
		<td colspan="3" align="left"> 
		<%= g_groupName %> 
		</td>
	</tr>
	<tr align="left" valign="middle">
		<td class="td0" align="right" >协调部门是否需要填写办理意见</td>
		<!-- <td  colspan="3">是<input type="radio" id="XFXYHF1" name="XFXYHF" value="1" />&nbsp;否<input type="radio" id="XFXYHF0"  name="XFXYHF" value="0" /></td> -->
		<td  colspan="3">是<input type="radio" id="XFXYHF0" name="XFXYHF" value="0" />&nbsp;否<input type="radio" id="XFXYHF1"  name="XFXYHF" value="1" /></td>
	</tr>
	<tr align="right" valign="middle">
		<td class="td0">处理结果</td>
		<td colspan="3" align="left"><textarea name="CLFS" cols="80"
			rows="3" ></textarea></td>
	</tr>
	<!-- 
	<tr align="right" valign="middle" >
		<td class="td0">二级接访<br>处理建议</td>
		<td colspan="3" align="left"><textarea name="CLFS2" cols="80"
			rows="3" ></textarea> </td>
	</tr>
	<tr align="right" valign="middle" >
		<td class="td0">三级接访<br>处理建议</td>
		<td colspan="3" align="left"><textarea name="CLFS3" cols="80"
			rows="3" ></textarea> </td>
	</tr>
	<tr align="right" valign="middle" >
		<td class="td0">四级接访<br>处理建议</td>
		<td colspan="3" align="left"><textarea name="CLFS4" cols="80"
			rows="3" ></textarea> </td>
	</tr>
	 -->
	<tr align="right" valign="middle">
		<td class="td0">图像附件</td>
		<td colspan="3" align="left"><input type="file" name="PIC"
			id="PIC" />&nbsp;&nbsp; 
		</td>
	</tr>

	<tr align="right" valign="middle">
		<td class="td0">视频附件</td>
		<td colspan="3" align="left"><input type="file" name="VIDEO"
			id="VIDEO" />&nbsp;&nbsp; 
		</td>
	</tr>
</table>


<%
		if (list1 != null && !list1.isEmpty()) {
				for (int i = 0; i < list1.size(); i++) {
					Map info = (Map)list1.get(i);
					
					String hdlstatus = (String)info.get("H_STATUS");
					AnnexInfo[] ais = (AnnexInfo[])info.get("HFFJ");
					AnnexInfo ai = (ais != null ? ais[0] : null);
					if(hdlstatus.equals("1")){
		%>
		<table border="1" class="tab-noborder" style="margin-top:5px;" width="800" cellspacing="0" cellpadding="0" align="center">		
		<tr>
			<td style="border:0px;" colspan="2"><b>办理人：</b><%=info.get("H_USERNAME") %>，<b>所在科室：</b><%=info.get("H_GROUPNAME") %>，<b>办理时间：</b><%=DateTrimmer.getYMD_LBL((String)info.get("H_DATE")) %></td>
		</tr>
		<tr>
			<td style="border:0px;" width="10%" valign="top"><b>处理意见：<b></td>
			<td style="border:0px;" align="left"><%=info.get("H_BACKINFO") %></td>
		</tr>
		<%if(ai != null){ %>
		<tr>
			<td style="border:0px;" width="10%" valign="top"><b>附件：<b></td>
			<td style="border:0px;" align="left"><a href="javascript:void(0);" onclick="javascript:viewAnnex('<%=ai.getID()%>');" title="查看附件"><%=ai.getName()%></a></td>
		</tr>
		<%} %>
		</table>
		<%
			  
					}
				}	
			}
		%>
</form>
<script>

var hdllevel = document.getElementById("HANDLELEVEL");

switch(hdllevel.value){case "1":
     				document.getElementById("handleL_1").checked = true;
					break;
					case "2":
					document.getElementById("handleL_2").checked = true;
					break;
					case "3":
					document.getElementById("handleL_3").checked = true;
					break;
					case "4":
					document.getElementById("handleL_4").checked = true;
					break;
					}
     	


</script>
</BODY>
</HTML>
